from mongoengine.connection import connect
from setting import Config
from flask import Flask
from preview_and_edit_online.wps import wps_bp

config = Config()
app = Flask(__name__)
app.config.from_object(config)
app.register_blueprint(wps_bp, url_prefix='/api/v1.0/wps/v1/3rd')

# 连接数据库
connect(host=config.MONGO_HOST_URL)

if __name__ == '__main__':
    app.run(host='0.0.0.0', port=5000)
